package org.ccay.async.config;

import org.ccay.async.IMessageProcessor;
import org.ccay.core.exception.ApplicationException;

/**
 * 消息处理器配置。
 * 	
 * 
 * @since Dec 13, 2011
 */
public class MessageProcessorConfig extends MessageConfig {
	
	/** 消息对应的处理器 **/
	private IMessageProcessor processor;
	
	/**
	 * 获取消息处理器	
	 * 
	 * @since Dec 12, 2011
	 * @return
	 */
	public IMessageProcessor getProcessor() {
		return processor;
	}

	/**
	 * 设置消息处理器
	 * 
	 * 
	 * @since Dec 12, 2011
	 * @param processor
	 */
	public void setProcessor(IMessageProcessor processor) {
		this.processor = processor;
	}

	/* (non-Javadoc)
	 * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
	 */
	public void afterPropertiesSet() throws ApplicationException {
		super.afterPropertiesSet();
		
		assert(this.processor!=null);
	}
	
	

}
